/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jse;

/**
 *
 * @author WangShuai
 */
public class StringTest {
    public static void main(String[] args) {
//        //1.isEmpty method:  count
//        String s = null;
//        //System.out.println(s.isEmpty());  //java.lang.NullPointerException
//        s = " ";
//        System.out.println(s.isEmpty());  //false
//
//        //2.IndexOf method
//        s = "abc";
//        System.out.println(s.indexOf("abcd"));  //-1
//
//        //3,null + str
//        s = null;
//        System.out.println(s+"a"); //nulla
        System.out.println("abc\na\rbc".replaceAll("[\\s]", ""));
        
    }
}
